package com.jzy.gulimall.product.feign.fallback;

import com.jzy.common.exception.BizCodeEnum;
import com.jzy.common.utils.R;
import com.jzy.gulimall.product.feign.SeckillFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author jzy
 * @date 2020/9/24 20:35
 */
@Slf4j
@Component
public class SeckillFeignFallBack implements SeckillFeignService {

    @Override
    public R getSkuSeckillInfo(Long skuId) {
        log.info("熔断方法调用:SeckillFeignFallBack:getSkuSeckillInfo");
        return R.error(BizCodeEnum.TOO_MANY_REQUEST.getCode(), BizCodeEnum.TOO_MANY_REQUEST.getMessage());
    }
}
